package co.fitstart.admin.service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.demo2do.core.support.Page;

import co.fitstart.admin.entity.content.RoundSearch;
import co.fitstart.entity.course.Course;
import co.fitstart.entity.course.CourseType;
import co.fitstart.entity.course.round.CourseRound;
import co.fitstart.entity.course.round.GroupRoundAttr;
import co.fitstart.entity.course.round.RoundStatus;
import co.fitstart.entity.principal.Principal;
import co.fitstart.entity.site.Site;
import co.fitstart.entity.user.bwh.BwhRecord;

/**
 * 
 * @author lidan
 *
 */
public interface OfflineRoundService {

    /**
     * 
     * @param site
     * @param status
     * @param courseType
     * @param page
     * @return
     */
    public List<CourseRound> listGroupRound(Site site, String status, CourseType courseType, Page page);

    /**
     * 
     * @param sites
     * @param status
     * @param courseType
     * @param page
     * @return
     */
    public List<CourseRound> listGroupRound(List<Site> sites, String status, CourseType courseType, Page page);
    
    /**
     * 
     * @param courseType
     * @param course
     * @return
     */
    public List<Map<String, Object>> listCourseRound(CourseType courseType, Course course);
    
    /**
     * 
     * @param courseType
     * @param course
     * @param sites
     * @return
     */
    public List<Map<String, Object>> listCourseRound(CourseType courseType, Course course, List<Site> sites);
    

    /**
     * 
     * @param courseRoundIds
     * @return
     */
    public List<CourseRound> listCourseRound(List<Long> courseRoundIds);

    /**
     * 
     * @param code
     * @return
     */
    public List<CourseRound> listCourseRound(String code);

    /**
     * 
     * @param course
     * @param roundStatus
     * @return
     */
    public List<CourseRound> listCourseRound(Course course, RoundStatus roundStatus);

    /**
     * 
     * @param courseType
     * @return
     */
    public List<CourseRound> listCourseRound(CourseType courseType);

    /**
     * 
     * @param roundSearch
     * @param page
     * @return
     */
    public List<CourseRound> search(RoundSearch roundSearch, Page page);

    /**
     * 
     * @param code
     * @return
     */
    public CourseRound loadCourseRound(String code);

    /**
     * 
     * @param courseRound
     * @param hours
     */
    public void editHours(CourseRound courseRound, int hours);

    /**
     * 
     * @param courseRound
     * @param coach
     */
    public void bindIndividualCourseCoach(CourseRound courseRound, Principal coach);

    /**
     * 
     * @param courseRound
     * @param coach
     */
    public void changeIndividualCourseCoach(CourseRound courseRound, Principal coach);

    /**
     * 
     * @param courseRounds
     * @param courseCode
     * @param gym
     * @param startDate
     */
    public void generateGroup(List<CourseRound> courseRounds, String courseCode, String gym, String startDate);

    /**
     * 
     * @param courseRounds
     * @param beginDate
     * @param dayhour
     */
    public void arrangeGroup(List<CourseRound> courseRounds, Date beginDate, String... dayhour);

    /**
     * 
     * @param course
     * @param beginDate
     * @param dayhours
     * @return
     */
    public List<String> calculateDayhour(Course course, Date beginDate, String... dayhours);

    /**
     * 
     * @param roundCode
     * @param groupRoundAttr
     */
    public void editGroupBasic(String roundCode, GroupRoundAttr groupRoundAttr);

    /**
     * 
     * @param coach
     * @param roundCode
     * @param dayhour
     */
    public void bindGroupRoundCoach(Principal coach, String roundCode, String dayhour);

    /**
     * 
     * @param courseRound
     * @param roundCode
     */
    public void addGroupRound(CourseRound courseRound, String roundCode);

    /**
     * 
     * @param courseRound
     * @param isRefund
     * @param refundPrice
     */
    public void dropCourse(CourseRound courseRound, Boolean isRefund, BigDecimal refundPrice);

    /**
     * 
     * @param courseRound
     * @param roundCode
     */
    public void transfer(CourseRound courseRound, String roundCode);
    
    /**
     * 
     * @param courseRound
     */
    public void removeCourse(CourseRound courseRound);
    
	 /**
     * 
     * @param courseRound
     * @param coach
     */
    public void setYearRoundKeyCoach(CourseRound courseRound, Principal coach);
    
   
    /**
     * 
     * @param bwhRecord
     * @param courseRound
     * @param principal
     */
    public void addBwh(BwhRecord bwhRecord,CourseRound courseRound, Principal principal);
}
